function main(argMap){
    
    var data=argMap.get("data"); //This is a java stringbuffer object,it`s api method same as stringbufer`s api
    //JSLogger.debug("Received:"+data);
    var session=argMap.get("session"); //This is device session
    //{{1234567890}}
    if(session.getCache().get("dev_id")!=null){
        return;
    }
    var loginHead="7B7B";
    var startIndex=data.indexOf(loginHead);
    if(startIndex==-1){
        return;
    }
    var endIndex=data.indexOf("7D7D",startIndex);
    if(endIndex==-1){
        return;
    }
    var idHex=data.substring(startIndex+loginHead.length(),endIndex)+"";
    var id=JSHexUtil.hexToString(idHex);
    data.delete(0,endIndex+4);
    session.getCache().put("dev_id",id);
    session.login();
    JSLogger.info("Session login success,id="+id);
}